package com.atguigu.spzx.order.mapper;

import com.atguigu.spzx.model.entity.order.OrderInfo;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * ClassName: OrderInfoMapper
 * Package:
 * Description:
 *
 * @Author:xiaohei
 * @Create 2024/5/23 21:47
 * Version 1.0
 */
@Mapper
public interface OrderInfoMapper {
    //添加数据到数据库
    void save(OrderInfo orderInfo);

    //获取订单信息
    OrderInfo getById(Long orderId);

    //根据用户id和订单状态进行查询
    List<OrderInfo> findUserPage(Long userId, Integer orderStatus);

    //远程调用：根据订单编号获取订单信息
    OrderInfo getByOrderNo(String orderNo);
}
